home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / A-line / Scripts / Clean < prev    next >
Encoding:
Text File  |  2000-06-24  |  1.0 KB  |  57 lines

  1. # Clean
  2.  
  3. Loop
  4.     Break if {#} == 0
  5.     If "{1}" == "--distclean"
  6.         Set DISTCLEAN "--distclean"
  7.     Else If "{1}" == "--maintainerclean"
  8.         Set MAINTAINERCLEAN "--maintainerclean"
  9.         Set DISTCLEAN "--distclean"
  10.     Else
  11.         Echo "{0}: Unknown thingy '{1}' on the command line."
  12.         Exit 1
  13.     End
  14.     
  15.     Shift
  16. End
  17.  
  18. Set TARG ":"
  19. Echo "Cleaning {1}..."
  20. If `Exists "{TARG}(Temporary)"`
  21.     Echo "> (Temporary)"
  22.     Delete -i -y "{TARG}(Temporary)"
  23. End
  24. If `Exists "{TARG}(Objects)"`
  25.     Echo "> (Objects)"
  26.     Delete -i -y "{TARG}(Objects)"
  27. End
  28. If "{DISTCLEAN}"
  29.     If `Exists "{TARG}(Libraries)"`
  30.         Echo "> (Libraries)"
  31.         Delete -i -y "{TARG}(Libraries)"
  32.     End
  33.     If `Exists "{TARG}(Executables)"`
  34.         Echo "> (Executables)"
  35.         Delete -i -y "{TARG}(Executables)"
  36.     End
  37.     If `Exists "{TARG}<Pre-gen>"`
  38.         Echo "> <Pre-gen>"
  39.         Delete -i -y "{TARG}<Pre-gen>"
  40.     End
  41. End
  42. If "{MAINTAINERCLEAN}"
  43.     If `Exists "{TARG}<Pre-gen>"`
  44.         Echo "> <Pre-gen>"
  45.         Delete -i -y "{TARG}<Pre-gen>"
  46.     End
  47.     If `Exists "{TARG}[Dependencies]"`
  48.         Echo "> [Dependencies]"
  49.         Delete -i -y "{TARG}[Dependencies]"
  50.     End
  51. End
  52.  
  53. Echo "All clean."
  54.  
  55. Exit
  56. # The end.
  57.